<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="file:///android_asset/lemon/css/constants.css" />
<link rel="stylesheet" type="text/css" href="file:///android_asset/lemon/css/contact.css" />
<script type="text/javascript" src="file:///android_asset/lemon/js/jquery.min.js" />
<script type="text/javascript" src="file:///android_asset/lemon/js/constants.js" />
<script type="text/javascript" src="file:///android_asset/lemon/js/contact.js" />
<script type="text/javascript">
var server_address = window.lemon.js2client(4,null);
document.write("<div id='head'>");
document.write("<h3 id='head1' align='center' >好友头像</h3>");
document.write("</div>");
//var user_img = "<img src='"+server_address + "/tom/res/img/"+user_id+".jpg' alt='点我' width='110' height='150' id='self'/>";
//document.write(user_img);
//var explain = "<p id='explain'>好友列表</p>";
//document.write(explain);
//document.write("<hr width='220' align='left' size=1 color=#9d9d9d style='FILTER: alpha(opacity=80,finishopacity=30);left:0px;'>");
document.write("<div class='div_contact' style='margin-top:10%'>");
var data = window.lemon.httpGet(server_address+"/tom/servlet/C2S2returnFriends?cmd=2&user_id="+user_id);
var str1 = new String(data);
var str2 = str1.slice(9,str1.length);
var str3 = str2.substring(0,str2.indexOf("}"));
friends_index = str3.split(",");
var i = "";
var j = "";
for(i = 0,j=0; i < friends_index.length; i++,j++){
	if( j >  14){
	    break;	
    }
	var img_path= "<img alt='"+friends_index[i]+"' src='"+server_address+"/tom/res/img/"+friends_index[i]+".jpg' width='80' height='120' id='"+friends_index[i]+"' />";
	document.write(img_path);
}
document.write("<p id='last'></p>");
$(document).ready(function(){
	$(window).scroll(function() {
	    if(document.body.scrollTop + document.body.clientHeight > document.body.scrollHeight / 10 ){
		if(j == friends_index.length){
			return;
		}
		for(i = j ; i < friends_index.length;i++){
			if(i < j * 2){
				var img_path= "<img alt='"+friends_index[i]+"' src='"+server_address+"/tom/res/img/"+friends_index[i]+".jpg' width='80' height='120' id='"+friends_index[i]+"' />";
				$("p#last").append(img_path);
				
			}else{
				break;
			}
		}
		j = i;
		$(document).ready(function(){
				$("div.div_contact img").click(function(){
					window.lemon.js2client(2,"friends_detail.html?_id="+this.id+"&user_id="+user_id);
				});
		});
		}
	});
});
document.write("</div>");



</script>
</head>
<body class="contact">

</body>
</html>